
import { NzMessageService } from 'ng-zorro-antd';
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot,Resolve } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { LoginService } from '../../services/services';
import {ModuleTree} from "../../entities/entities";

/**获取侧边栏中菜单模块数据的 守卫*/
@Injectable()
export class ModelPermissionResolve implements Resolve<ModuleTree> {
    constructor(private loginService: LoginService) {}
    resolve(route: ActivatedRouteSnapshot): Observable<ModuleTree> | Promise<ModuleTree> | ModuleTree {
    	var rootTree= this.loginService.getRootTree();
    	return rootTree;
    }
}
